package com.jp.knowledge.my.activity;

import android.view.View;

import com.jp.knowledge.activity.TeamCircleCreateActivity;
import com.jp.knowledge.http.HttpHelper;
import com.jp.knowledge.util.JsonUtil;

/**
 * Created by 528787067@qq.com on 2017/5/9.
 */

public class FeedbackCreateActivity extends TeamCircleCreateActivity {

    private int level;

    @Override
    protected void init() {
        level = getIntent().getIntExtra("level", 1);
        super.init();
        topName.setVisibility(View.VISIBLE);
    }

    @Override
    protected void initView() {
        super.initView();
        topName.setText(level == 1 ? "反馈" : "纠错");
        itemLevel.setVisibility(View.GONE);
        itemToCompany.setVisibility(View.GONE);
        itemVisibility.setVisibility(View.GONE);
        itemRemind.setVisibility(View.GONE);
    }

    @Override
    protected void pushDynamic() {
        paramsBean.setLevel(level);
        paramsBean.setContent(contentEdit.getText().toString());
        HttpHelper.getInstance(mContext)
                .feedbackPush(JsonUtil.getInstance().entityToJson(paramsBean), PUSH_DYNAMIC_CODE, this);
    }
}
